//    Copyright (C) Kherty.  All rights reserved.
using System.Diagnostics.Contracts;

namespace OpenLS.Core.Serialization
{
    public struct XmlNamespace
    {
        public XmlNamespace(string prefix, string namespaceUri, bool qualifiedAttributes)
        {
            Contract.Requires((prefix == null) || (namespaceUri != null));
            _prefix = prefix;
            _namespaceUri = namespaceUri;
            this._qualifiedAttributes
                = qualifiedAttributes;
        }
        public static XmlQualifiedName operator + (XmlNamespace ns, string name)
        {
            return new XmlQualifiedName(ns, name);
        }
        private readonly string _prefix;

        public string Prefix
        {
            get { return _prefix; }
        }

        readonly string _namespaceUri;
        public string NamespaceUri
        {
            get
            {
                return _namespaceUri;
            }
        }

        private readonly bool _qualifiedAttributes;
        public bool QualifiedAttributes
        {
            get { return _qualifiedAttributes; }
        }
    }
}